<?php
/**
 * @link https://ym2.cleverstone.top
 * @copyright Copyright (c) 2020 Yii Manager Software LLC
 */

namespace builder\tree\util\oitem;

use builder\helper\App;

/**
 * 继承类
 * @author cleverstone
 * @since ym2.0
 */
abstract class OperationType
{
    /**
     * @return array
     */
    abstract public function _toArray();

    /**
     * RBAC检查
     * @param string $route 路由或外链
     * @return bool
     */
    protected function checkAccess($route)
    {
        return App::rbacManager()->permissionValidate($route);
    }
}